package com.ygl.dao;

import com.ygl.common.mybatis.BaseDao;
import com.ygl.entity.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author： ygl
 * @date： 2019/02/02
 * @Description：
 */
@Mapper
public interface UserDao extends BaseDao {

    @Select("select ID,USERNAME,PASSWORD,phone,EMAIL, created,updated from mb_user  WHERE PHONE=#{phone} and password=#{password}")
    public UserEntity getUserPhoneAndPwd(@Param("phone") String userName, @Param("password") String password);

    @Select("select ID,USERNAME,PASSWORD,phone,EMAIL, created,updated from mb_user  WHERE id=#{id}")
    public UserEntity getUserInfo(@Param("id") Long id);

}

